#pragma once
#include"cocos2d.h"
#include<string>

class UserRecord :public cocos2d::CCObject
{
	CC_SYNTHESIZE_PASS_BY_REF(std::string, m_userId, UserId);
	CC_SYNTHESIZE_PASS_BY_REF(int, m_coin, Coin);
	CC_SYNTHESIZE_PASS_BY_REF(int, m_exp, Exp);
	CC_SYNTHESIZE_PASS_BY_REF(int, m_life, Life);

public:
	UserRecord(const std::string& userId);
	virtual  ~UserRecord();
	
	void SaveToUserDefault();
	
	void ReadFromUserDefault();
};
